togglebutton: Fix mnemonic activation
authorMatthias Clasen <mclasen@redhat.com>
Sun, 23 May 2021 14:26:21 +0000 (10:26 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Sun, 23 May 2021 15:20:00 +0000 (11:20 -0400)
We want to grab the focus when we're focusable, so
look at the focusable property.

gtk/gtktogglebutton.c

index 3a24a0c31406182fe20ad0fdbd7b1399edde2164..4ea135ee482dcf884324e30469b682c7cdf7247f 100644 (file)
@@ -184,7 +184,7 @@ gtk_toggle_button_mnemonic_activate (GtkWidget *widget,
    * gtk_widget_real_mnemonic_activate() in order to focus the widget even
    * if there is no mnemonic conflict.
    */
-  if (gtk_widget_get_can_focus (widget))
+  if (gtk_widget_get_focusable (widget))
     gtk_widget_grab_focus (widget);
 
   if (!group_cycling)